No need to gate xenstored reading requests from a
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Mon, 10 Oct 2005 10:37:10 +0000 (11:37 +0100)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Mon, 10 Oct 2005 10:37:10 +0000 (11:37 +0100)
connection on whether there are pending replies/watches.
Signed-off-by: Keir Fraser <keir@xensource.com>
tools/xenstore/xenstored_core.c
tools/xenstore/xenstored_domain.c
tools/xenstore/xenstored_transaction.c

index 4c998bea70b6c8a54e6467049a8205e1c7a673a6..50bdee9a669a6bc6729e71a38c053e1f7bcd502e 100644 (file)
@@ -324,8 +324,7 @@ static int initialize_set(fd_set *inset, fd_set *outset, int sock, int ro_sock)
        list_for_each_entry(i, &connections, list) {
                if (i->domain)
                        continue;
-               if (list_empty(&i->out_list))
-                       FD_SET(i->fd, inset);
+               FD_SET(i->fd, inset);
                if (!list_empty(&i->out_list))
                        FD_SET(i->fd, outset);
                if (i->fd > max)
index 15c98bfb493d4771b93210560f3e2f8679b04833..e35990b12d77ff41ccbcf34874559d1f5d563dab 100644 (file)
@@ -276,8 +276,7 @@ void handle_event(void)
 
 bool domain_can_read(struct connection *conn)
 {
-       return (list_empty(&conn->out_list) &&
-                buffer_has_input(conn->domain->input));
+       return buffer_has_input(conn->domain->input);
 }
 
 bool domain_can_write(struct connection *conn)
index c0b4f3206e6629e0307884d88bc9210d5442d30c..640d10540f025a730b688651fe82417f0c82ddd4 100644 (file)
@@ -154,9 +154,9 @@ void do_transaction_end(struct connection *conn, const char *arg)
                return;
        }
 
-       /* Set to NULL so fire_watches sends events, tdb_context works. */
        trans = conn->transaction;
        conn->transaction = NULL;
+
        /* Attach transaction to arg for auto-cleanup */
        talloc_steal(arg, trans);